package com.duomn.mybatis.plugins.config;

import com.duomn.mybatis.plugins.IShardingConfig;

public class ShardingConfigImpl implements IShardingConfig {

	@Override
	public boolean supplyShading(String tableName) {
		if ("sample".equals(tableName)) {
			return true;
		}
		return false;
	}

	@Override
	public String[] getShadingTables(String tableName, String rule) {
		if ("sample".equals(tableName)) {
			return new String[] {"sample_1", "sample_2"};
		}
		return null;
	}

}
